fit to samples