refine whole memory system