Rigorous way to maximize the llh