finalized mle_gamma