Refactored word chains lengthy method