d3 demo
refactor