add gameover, and fix some bugs