Implemented a level listener class