changing trend.index to trend.trend