added commit functionality