Implemented multidimensional MLE in c