Implemented the class but the listener is not working