adding better header management