added map function for collection