residue syntax check