modify the levelstate and playstate