added event behavior and an example of its usage