                         codeInputView.clear()
 
                     } else {
-                        self.checkCodeMessageShowAlert(code, codeInputView: codeInputView)
+                        self.checkCodeMessageShowAlert(message, serverMessageCode: serverCode, codeInputView: codeInputView)
                         codeInputView.clear()
                     }
                 }

        }
    }
    
    func checkCodeMessageShowAlert(code: String?, codeInputView: CodeInputView){
        if let codeMessage = code {
            if codeMessage == YonaConstants.serverCodes.tooManyResendOTPAttemps {
                //make sure they are never on screen at same time
                self.resendCodeButton.hidden = false
                self.pinResetCodeButton.hidden = true
                self.codeInputView?.userInteractionEnabled = false
                #if DEBUG
                    self.displayAlertMessage("App blocked too many OTP attempts, press resend", alertDescription:"")
                    self.displayAlertMessage("", alertDescription: NSLocalizedString("smsvalidation.user.pincodeattempted5times", comment: ""))
                #endif
            }//too many pin verify attempts so we need to clear and the user needs to request another one
            else if codeMessage == YonaConstants.serverCodes.tooManyPinResetAttemps {

                } else {
                    //pin reset verify code is wrong
                    dispatch_async(dispatch_get_main_queue()) {
                        self.checkCodeMessageShowAlert(message, serverMessageCode: code, codeInputView: codeInputView)
                        codeInputView.clear()

                    }
