Added fitting code. Untested because I need some data.