updated frontend for the new aggregated_query service