halfway done rewriting caching tests