adding game over conditions and modifying the controller