maximum likelihood solution