changes to kd3.js