Adding elastic threads to hats