changes to backtest code