added variables to player.js and fixed bug