K nearest algorithm complete-ish