changed fit function for PML (fmin instead of logLik)