more thoughts on wallet code