remove remove-repeants from alg