Completed functions
Added modulus function