define the callback for the player