CHG: Added optimization.