using type_id and unit_id as a unique identifier instead of just unit_id