__del__
add a decorator that caches function call results in a json file