created functions
added modulus