updated main.js for faster frames per second