refactor based on feedback and fix an issue with test failing due to change of store format