fix code, add memory driver