use level-mem instead of level