Generalise to accept an arbitrary number of components (Up to 3 components – CO2, N2, H2O, is fine in the first instance).