fixing BuildModel1
bug fixes to buildmodel1