finished buildmodel()