finish the MemoryController.v