started to implement the key generator