querysub improve