seems better to use the map function as parameter