adds CO2 calculator function for multiple legs