Added header logic