initial es6 implementation for memory adapter