code related to fitting data scattering properties to a model