updated check for secrety key