add memory adapter boilerplate