EVEN MORE MERGING WITH MEMOIZATION