changed update method to include safety mode