define macro for handler functions
Merge pull request #62 from cubicdaiya/improvements/define_macro_handlers

define macro for handler functions