updated sample r