updated map all function