complete the LRU algorithm