Added likelihood function