combine queries, add better D3 code