[Do Not Merge] Separating out node selection algorithm