added auto header placement