split the assign new stable_ids script such that we do not need to edit it any more