fixed likelihood function