Mapping words to the following word. Need refactor