adding key generation
fix first line