wrote myknn2 function, slightly optimized. doesnt work for k>1 yet!

(its faster for around 10%)