added header update function