While writing apply_assignments