Modify generating key