made basic game logic