adapted fitting code to include changing deltas in exponential model.