Added event detection example