refactored total distance again in android app