adding key to server and client