sorting out the cache