added rewritten full query file