adding socket.io functionality