Trying the closest neighbours algorithm