Using proper function to merge headers