distance based classification is implemented