done with generic curve fitting stuff