updating R-script