added handling for when the sample set is empty