add safe update