Thymic selection pathway regulates the effector function of CD4 T cells