moving all communication to socket.io