move some level 1~3 code to level file