small changes to caching