Added a function to player context