adding goodness-of-fit in first iterations
adding goodness-of-fit in first iterations