Updated Example2 to use predefined handlers