removed memoization extra credit