Simplify memo - this can just be a number, no need for it to be a list.