obj2map equivalent with prewalk. cleaned up4.