added longest repeated substring