optimized repetitioncheck

now every character will be examined to check for repetitions. The
highest repetitionvalue will be considered for further calculations.