generalizing dist