changes to model optimizer