adding Player, organizing code