simplifying in map.cpp