add use_cache and test

allows looping, sort of