implement hats

https://lobste.rs/s/bkeYe9/about_lobsters/comments/ZD2tL3#c_ZD2tL3