range over map to make node value setting easier