marrying co2 calculation with frontent