Added required code for listeners