Portable Implementation