     
     func verificationStatusChanged(to verificationState: TCVerificationState) {
         DispatchQueue.main.async {
-            if verificationState == .otpInitiated {
-                self.otpView.isHidden = false
-                self.phoneNumberView.isHidden = true
-            } else if verificationState == .verificationComplete {
-                self.showAlert(with: "Sign up successful",
-                               message: "Your otp is validated and profile created.")
-            }
+            self.handle(verificationState: verificationState)
+        }
+    }
+    
+    private func handle(verificationState: TCVerificationState) {
+        switch verificationState {
+        case .otpInitiated:
+            self.otpView.isHidden = false
+            self.phoneNumberView.isHidden = true
+        case .verificationComplete:
+            self.showAlert(with: "Sign up successful",
+                           message: "Your otp is validated and profile created.")
+        case .otpReceived, .verifiedBefore:
+            break
+        @unknown default:
+            break;
         }
     }
 }

    @IBAction func signUp() {
        view.endEditing(true)
        TCTrueSDK.sharedManager().requestVerification(forPhone: phoneNumberField.text ?? "",
                                                      countryCode: "in")
    }

    @IBAction func continueWithOTP() {

    @IBOutlet weak var otpField: UITextField!
    @IBOutlet weak var firstNameField: UITextField!
    @IBOutlet weak var lastNameField: UITextField!
    
    //Default india since the market now is only india
    let defaultCountryCode = "in"

    override func viewDidLoad() {
        super.viewDidLoad()
        
        TCTrueSDK.sharedManager().delegate = self
        
        otpView.isHidden = true
