working on mem heirarchy