work on generating keys