implemented int fib(n), however function returns n+1 instead of n, need to fix this bug