Revert "remove function map"

This reverts commit 5145f3bcf8649c0072368cfdaa431b558dbef0b9.