distance thread - not done