game logic implemented. code clean up