swapped out sed for a simple python replace