updated some of the queries