realization of "to polish" algorithm

error: fall on operators with equal rank