restructured, player class added