added all math functions to main.js