Scientists Finally Figure Out What Hats Do