Solved substrings again with array.