a hat is used for protect the head from the sun