added method to check the pin number