made changes to game.js to increase efficiency.