move ToText class to a separate module