Details to follow Will probably use piecewise exponential function, Nan has done some of this work already