added socket.io communication