add word processing function