fix edit script to be universal