added datastore generator function