wrote memoized fib function