add safe mode