add the socket listening part