refactored store into a single package