Added private method setHeader()