Added assignment logic.