add use of commit variable