removed sample_size variable