added gameover function