funtion added to the map