changed this.model to this.opt.model