Implemented new method for registerListener