added option to mapObj