Use hashmap in memoized run
Main: use the "run" functions