cleanup / fix memoize