naive implementation of lru