Added the  substring frequency method.