Changed all occurances of wire(*,*,model) to model.wire(*,*)