added listener functionality in ConnectionService