retrieves data from datastore