more exampled on how to catch events