move transactions into the iterator to make cursors more stable/reliable