adding in analsysis R scripts