Define methods to listen events from backend