Updated most of the queries