updating with caching