find a bug in loglikelihood