updated the max likelihood estimation