tweaks and new test for caching results