Optimization of the thermoelectric properties of Ba8Ga16Ge30