Rewrite store to return a promise