Working on nodes distcances