How to check total distance?