updated player.js