added first implementation of nearest neighbour