Made this a function of player