Added some math functions