DRY up node selecting