refactoring: stores using immutable structures