trend computation modified