SubstringSort class should be private