event store refactoring