extracted class into game logic class