allow secret key to be passed as a parameter