fixed some queries
changing some queries