Updated caching (working now)