write a method to generate the nth fibonacci number