fixed key generation
merge