changes to get p file head-reducing working