added a random session key generator