Added dispatch events example to define_method