testnet support
fixes and test