Added delegated option to on events