remove old func interface
add unit test for macros