initial version

copied from http://bl.ocks.org/mbostock/4063423