repetition extracted

done:
 extract the number of repetitions

left:
 detecting symmetry