refactoring + add distance nounou