changes to the collate script