Code written to solve issue of listeners.