created the memoized wrapper