moved header outside try