changed things to make the secret key work