serialize and visualize with D3