rename memoize snippet