Correct sampling method

added set.seed