add a check on update method from repository