add class Distances+test, rewrite bot