some refactoring to get some word-specific information out