refactoring
Set header upon return