fixing loglik calculation. Added Q.