Added update method in repository