update if conditions in update method