refactor datastore method calls