player funtionality