Added optimization of log likelihood