added header rendering function