working query and visualizations