changed javascript selectors to d3