refactored, +memoryrepo