added basic game logic