added map method to collection.