refactor add headers