random key generation added