def _update_spcs(model, starting_id_dict, spc_id, spc_map):
    """updates the spcs"""
    if 'spc_id' in starting_id_dict and spc_id is not None:
        for spc_idi, spc_group in sorted(model.spcadds.items()):
            for unused_i, spc in enumerate(spc_group):
                assert hasattr(spc, 'conid')
                spc.conid = spc_id
            spc_map[spc_idi] = spc_id
            spc_id += 1
        for spc_idi, spc_group in sorted(model.spcs.items()):
            for unused_i, spc in enumerate(spc_group):
                assert hasattr(spc, 'conid')
                spc.conid = spc_id
            spc_map[spc_idi] = spc_id
            spc_id += 1
    else:
        for spc_id in model.spcadds:
            spc_map[spc_id] = spc_id
        for spc_id in model.spcs:
            spc_map[spc_id] = spc_id
