Added #sample_with_replacement function