creating query path