Update the function for log likelihood