changed how fib function was defined