listening to the socket events