eliminate the extra sort-header script, use sed -u instead