generating key
working