added modulus support