implemented snippet memoized extension