simplified wallet code