text protocol class