added caro_wei invariant