takes 20 samples and saves to csv