edit code to save vars to new folders