updated native method to return datastore