added the functions to player.