The feedback mechanisms that regulate galaxy formation, exploding stars and accretion onto supermassive black holes, are poorly understood. This results in an order unity uncertainty in the distribution of the gas inside halos, the
missing baryon problem''. Because baryons are 15% of the total mass in the universe, this baryonic uncertainty is also the largest theoretical systematics for percent precision dark energy surveys like Euclid.
By measuring the kinematic and thermal Sunyaev-Zel'dovich effects (kSZ and tSZ), cosmic microwave background (CMB) experiments can solve these issues and determine the gas thermodynamics in galaxy groups and clusters, at high redshift and out to the outskirts of the halo. I will present joint tSZ, kSZ and dust measurements of BOSS (CMASS) galaxy groups. Using data from the Atacama Cosmology Telescope (ACT), we produce the highest significance kSZ measurement to date. This measurement shows with high statistical confidence that the gas is more spread out than the dark matter. It informs the modeling of the CMASS galaxy-galaxy lensing data, and shows that the small-scalelensing is low'' tension is not entirely caused by baryonic effects. Finally, comparing the observed kSZ and tSZ to hydrodynamical simulations reveals insight about galaxy formation.