switched to curve fitting toolbox