implemented most of wallet, no testing yet