changed to nearest neighbour