updated directories and r script