reorganized tracklength tally loops