Modified ImprovedFibonacci to use array