added BaseDoubleMin
modified chi2 computation