Modified for litecoind