refactors socket.io out of this version