add option for unweighted fit