edited r scripts