add multiple event support for on and off