updated get_type_info and to_type_info