abstract map functions to object