modifications for susbcribe loop events, connect, disconnect, reconnect