a substance needed for the proper functioning of the thyroid gland is