add residue flag for cli