Added each function to memoize