added support for multiple listeners