modified instruction to run queries