move some code to another place