change evolution of input array into best fit function