how to attach multiple event handlers