initial socket.io implementation