add macro for defhandler