added commit method