Changes for  query and final for part 1