Looked into the memoization, wrote a non-memoized version