fixed 'after' and added 'memoize'