average distance map normalized, T initialization method added