added listeners arg to allow defining custom listeners