new function for distance distribution fits