added CustomEvent support