tableWords refactoring