try switching d3 before query