Implemented many maths functions