function changegamestate is now setgamestate