added transaction-safe data update