update edit method to be compatible with multiple hostnames