minor reordering of model code --KW
model changes --KW