Implement global sampling
Remove round()
Fix surrogate for ties; add doctest
