commit method