almost working, fixed d3