Renamed collect to map for consistency