added most of the mathmatical functions