modified selection to match number of assignments