write threaded wallet in D