added functionality for commit and rollback