refactored two res.header into one