changing secondary key to length of string