small modifications to the CKeyGen class