breaking out sed function
added sed function but received header errors in mongrify