fit function

Fit first arguemnt to data in second argument.