renamed modifiedData to oldData