def _update_elements(model, starting_id_dict, eid, eid_map, mass_id_map,
    rigid_elements_map):
    """updates the elements"""
    if 'eid' in starting_id_dict and eid is not None:
        for eidi, element in sorted(model.elements.items()):
            element.eid = eid
            eid_map[eidi] = eid
            eid += 1
        for eidi, element in sorted(model.masses.items()):
            element.eid = eid
            eid_map[eidi] = eid
            mass_id_map[eidi] = eid
            eid += 1
        for eidi, elem in sorted(model.rigid_elements.items()):
            elem.eid = eid
            eid_map[eidi] = eid
            rigid_elements_map[eidi] = eid
            eid += 1
