added plan k-nn kernel