Add support for custom events