added toneTrend function