move some command for node to function