added support for custom listeners
custom listeners: added docs, fixed missing event variable