prepare extended querying