test query debug
improve test coverage