updated to support socket.io client