datastore api OR implementation plus initial tests