#17 added support for typed listeners