refactor batch fetch of nodes to helper method