update script to build the model