Using datastore API

Almost working :)