big switch to d3 and the way data is passed through the socket