improved the SocketService