added modulus functionality