Added update method in model