corrected some stuff in non-linear gmm with R