add sample_size as a field, remove unnecessary sampling code.