added k-nearest-neighbors code