create my-dispatch
made macro for creating the handler