solution for fib. not too fast or elegant, but it works.