replaced unnecessary list comprehension with lists:map/2