class definitions for text model phase 1