complete functions for caching and including test cases