refactored backtest. combined logic and set up framework for future blocks