added advanced errorestimation for linear fitting