added support for max iterations into gdmtrain