Added a weighted function which will be fit by least square. So far, all the
weights are ones, but it can be changed easily, once having the uncertainties,
also the error bars might be added