refactored datastore save menthod to save all datastores exactly the same way