Make use of map instead of iterating deliberately