Comments on the Hubble diagram. II. The technique of fitting