move some code blocks