added find repetition algorithm