Added support for custom event