added knearest & processing of training & testdata