progress on likelihood function