Added header handler function