updated trading engine