                 self.resendCodeButton.hidden = false
                 self.pinResetCodeButton.hidden = true
                 #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 {
                 //make sure they are never on screen at same time
                 self.resendCodeButton.hidden = true

            })
            
        }
    }
    
    override func viewWillAppear(animated: Bool) {
        super.viewWillAppear(animated)
    
        codeInputView = CodeInputView(frame: CGRect(x: 0, y: 0, width: 260, height: 55))
    
        if codeInputView != nil {
            if NSUserDefaults.standardUserDefaults().boolForKey(YonaConstants.nsUserDefaultsKeys.isBlocked) {
                self.resendCodeButton.hidden = true
                self.pinResetCodeButton.hidden = false
            } else {
                self.resendCodeButton.hidden = false
                self.pinResetCodeButton.hidden = true
            }
            codeInputView!.delegate = self
            codeInputView?.secure = true
            codeView.addSubview(codeInputView!)
            let dispatchTime: dispatch_time_t = dispatch_time(DISPATCH_TIME_NOW, Int64(0.1 * Double(50)))
            dispatch_after(dispatchTime, dispatch_get_main_queue(), {
                self.codeInputView!.becomeFirstResponder()
                if NSUserDefaults.standardUserDefaults().boolForKey(YonaConstants.nsUserDefaultsKeys.isBlocked) {
                    self.resendCodeButton.hidden = true
                } else {
                    self.resendCodeButton.hidden = false
                }
            })
        }
        
        //keyboard functions
        let notificationCenter = NSNotificationCenter.defaultCenter()
        notificationCenter.addObserver(self, selector: Selector.keyboardWasShown, name: UIKeyboardDidShowNotification, object: nil)
        notificationCenter.addObserver(self, selector: Selector.keyboardWillBeHidden, name: UIKeyboardWillHideNotification, object: nil)
    }
    
    override func viewWillDisappear(animated: Bool) {

        #endif
        UIApplication.sharedApplication().setStatusBarStyle(UIStatusBarStyle.LightContent, animated: false)
    }
    
    override func viewWillAppear(animated: Bool) {
        super.viewWillAppear(animated)
        
        codeInputView = CodeInputView(frame: CGRect(x: 0, y: 0, width: 260, height: 55))
        codeInputView!.becomeFirstResponder()
        
        if codeInputView != nil {
            if NSUserDefaults.standardUserDefaults().boolForKey(YonaConstants.nsUserDefaultsKeys.isBlocked) {
                self.resendCodeButton.hidden = true
                self.pinResetCodeButton.hidden = false
            } else {
                self.resendCodeButton.hidden = false
                self.pinResetCodeButton.hidden = true
            }
            codeInputView!.delegate = self
            codeInputView?.secure = true
            codeView.addSubview(codeInputView!)
            let dispatchTime: dispatch_time_t = dispatch_time(DISPATCH_TIME_NOW, Int64(0.1 * Double(50)))
            dispatch_after(dispatchTime, dispatch_get_main_queue(), {
                if NSUserDefaults.standardUserDefaults().boolForKey(YonaConstants.nsUserDefaultsKeys.isBlocked) {
                    self.resendCodeButton.hidden = true
                } else {
                    self.resendCodeButton.hidden = false
                }
            })
        }
        
        //keyboard functions
        let notificationCenter = NSNotificationCenter.defaultCenter()
        notificationCenter.addObserver(self, selector: Selector.keyboardWasShown, name: UIKeyboardDidShowNotification, object: nil)
        notificationCenter.addObserver(self, selector: Selector.keyboardWillBeHidden, name: UIKeyboardWillHideNotification, object: nil)
    }

    @IBAction func sendOTPAgain(sender: UIButton) {
        //get otp sent again
