added custom event support