[#113] Solve problem, steal some memoize code