First part of removing useAllSamples