add sum up distance