more idiomatic d3 functions
added documentation
resolved conflict