yet more tweaks to memoizing