Algebraic “Drain and Replace " exercise