redo with Set and Map in Memory