shortest_repetition better