refactor datastore for lastModified