Added total distance setting