update commit method