move some lines to local