fixed again likelihood function