started rewriting game logic