Neighbour function corrected