Added weights to euclidian distance

It looks like it works...