extract words.size to its own method called letter_index
minor refactoring