Add weights based on distances of neighbors