added penalized modelfit function