add feature for registering listeners