added 'map' function to intersection