adding maths functions

oops again, forgot to add to different branch :/