updated the queries