rewrite part that adds client keys