wrap list<word> into phrase + iterator code refactoring