replace for-comprehension with map