Why not just add the header before the loop?