refactor word-dialog