moving caching higher up