created classes Text and Model for code reuse