fixed d3 not defined - unnecessary code removed