Added Math Function to main.js .