Updated the map functions