exported a factory function
updated to use revised store api
updated memory store api
updated tests to use the new api