Added listener class and registered it