each function for object
map built on each