use memoryStorage method in examples