can these functions, that are the same as the one from map, be moved to a util?