update the fibonacci algorithm