added prerun function which generates new w