added algo to compute wasserstein