updated testnet code