add api macro to functions
remove visit method declaration