new algorithm for calculating percentage change