finding all substrings