change n.sim to be 50, deleted setwd() getwd()