split some code