added fibonacci without using stack for storing values