first working version of DataStoreFactory