final version, generates two copies of the wallet