move function for working with node position to a separate module