refactoring the memory wrapper