consecutively remove duplicates only when there are more than 2 duplicates