refactor game over