fixed bug calculating average distance between means
fixed bug calculating average distance between means
fixed bug calculating average distance between means