both versions working
remove function-map
more cleanup