  The analysis of the BATSE's count distribution within cosmological models
suffers from observational uncertainties due to the variability of the bursts'
spectra: when BATSE observes bursts from different redshifts at a fixed energy
band it detects photons from different energy bands at the source. This adds a
spectral dependence to the count distribution $N(C)$. Similarly variation of
the duration as a function of energy at the source complicates the time
dilation analysis. We describe here a new statistical formalism that performs
the required ``blue shifting" of the count number and the burst duration in a
statistical manner. This formalism allows us to perform a combined best fit
(maximal likelihood) to the count distribution, $N(C)$, and the duration
distribution simultaneously. The outcome of this analysis is a single best fit
value for the redshift of the observed bursts.
