was a bit overzealous with the sed replacements