Revert "back to d3 is not defined"

This reverts commit b2847a2c08d5484064e1cd4a82213e6488abf137.