adjusted query