finished doing the queries