added more logic to game loop and refined methods