measure gas exchange