merge latest changes made by Erin into our R scripts