datastore and tests updated from Gaurav