K-NN alogrithm start