game logic seperated