add basic find longest repeated substring in a given string