rewrite updowngame with other codes.