added method to player.js