adds to_str method for TermSet