- converted text_type into a class