remove_consecutive_duplicates