optimize fibonacci algorithm