moved all mathematical functions to a Math class