Changed to dynamic key generation