event handling separated
extend the demo