added script version of model1