a little bit more boundary swapping. Going to convert localNodes from vector to a map