add fib function and timeout