fixing an important bug in address generation, added random private key generation