checking query