added commit and rollback methods