added support for n-level custom events