updated scripts. Add set.seed so that SWAN is same each time