debug for getquery