distance should be member of Sample