Figure 4:
Algorithm including CRed and CRef.