object should be used instead of map
update docs and unit test