add trail computation