to apply modulo operation