made the secret not be a global var