fitting priors