added features to the curve fitting