added kNN method with test