Updated example with multiple listeners