made each reduce tasks do work in single transaction.