modified the fit sample path