implemented the map