added cache, removed old cache mechanism