Adding code to read in samples.