bug fixes to BuildModel1, updating test