transform to set_type()