class for n dist