added caches for expensive computations