make type_name a member function