             cell.deviceStateLabel.text = ""
             
             ParticleUtils.animateOnlineIndicatorImageView(cell.deviceStateImageView, online: self.devices[(indexPath as NSIndexPath).row].connected, flashing:self.devices[(indexPath as NSIndexPath).row].isFlashing)
-
-            // override everything else
-            if devices[(indexPath as NSIndexPath).row].isFlashing
-            {
-                cell.deviceStateImageView.image = UIImage(named: "imgCircle")
-            }
             
             masterCell = cell
         }

    
    
    
    func loadDevices()
    {
        ParticleLogger.logInfo(NSStringFromClass(type(of: self)), format: "Load devices started", withParameters: getVaList([]))

        // do a HUD only for first time load
        if self.refreshControlAdded == false
        {
            ParticleSpinner.show(self.view)
        }
        
        DispatchQueue.global().async {
            
            ParticleCloud.sharedInstance().getDevices({ (devices:[ParticleDevice]?, error:Error?) -> Void in

                self.handleGetDevicesResponse(devices, error: error)
                
                // do anyway:
                DispatchQueue.main.async { [weak self] () -> () in
                    if let s = self {
                        ParticleSpinner.hide(s.view)
                        // first time add the custom pull to refresh control to the tableview
                        if s.refreshControlAdded == false
                        {
                            s.addRefreshControl()
                            s.refreshControlAdded = true
                        }
                        s.showTutorial()
                    }
                }
            })
        }
    }


    func addRefreshControl()
    {
        self.tableView.addPullToRefresh(withPullText: "Pull To Refresh", refreshingText: "Refreshing Devices") { () -> Void in
            weak var weakSelf = self
            ParticleCloud.sharedInstance().getDevices() { (devices:[ParticleDevice]?, error: Error?) -> Void in
                weakSelf?.handleGetDevicesResponse(devices, error: error)
                weakSelf?.tableView.finishLoading()
            }
        }
    }



    func handleGetDevicesResponse(_ devices:[ParticleDevice]?, error:Error?)
    {
        ParticleLogger.logInfo(NSStringFromClass(type(of: self)), format: "Load devices completed", withParameters: getVaList([]))
        if let e = error
        {
            if (e as NSError).code == 401 {
                self.logout()
            } else {
                ParticleLogger.logError(NSStringFromClass(type(of: self)), format: "Load devices error", withParameters: getVaList([]))
                RMessage.showNotification(withTitle: "Error", subtitle: "Error loading devices, please check your internet connection.", type: .error, customTypeName: nil, callback: nil)
            }

            DispatchQueue.main.async {
                self.noDevicesLabel.isHidden = false
            }
        }
        else
        {
            if let d = devices
            {
                // if no devices offer user to setup a new one
                if (d.count == 0) {
                    self.setupNewDeviceButtonTapped(self.setupNewDeviceButton)
                }

                self.devices = d
                for device in self.devices {
                    device.delegate = self
                }
                
                self.noDevicesLabel.isHidden = self.devices.count == 0 ? false : true

                self.devices.sort(by: { (firstDevice:ParticleDevice, secondDevice:ParticleDevice) -> Bool in
                    if (firstDevice.connected != secondDevice.connected) {
                        return firstDevice.connected == true
                    } else {
                        var nameA = firstDevice.name ?? " "
                        var nameB = secondDevice.name ?? " "
                        return nameA.lowercased() < nameB.lowercased()
                    }
                })

                ParticleLogger.logInfo(NSStringFromClass(type(of: self)), format: "Load devices completed. Device count: %i", withParameters: getVaList([self.devices.count]))
                ParticleLogger.logDebug(NSStringFromClass(type(of: self)), format: "Devices: %@", withParameters: getVaList([self.devices]))

                DispatchQueue.main.async {
                    self.tableView.reloadData()
                }

                
            } else {
                ParticleLogger.logInfo(NSStringFromClass(type(of: self)), format: "Load devices completed. Device count: %i", withParameters: getVaList([self.devices.count]))
                ParticleLogger.logDebug(NSStringFromClass(type(of: self)), format: "Devices: %@", withParameters: getVaList([self.devices]))

                DispatchQueue.main.async {
                    self.noDevicesLabel.isHidden = false
                    self.setupNewDeviceButtonTapped(self.setupNewDeviceButton)
                }
            }
            
        }
    }

    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        return self.devices.count


                self.devices.remove(at: (indexPath as NSIndexPath).row)
                tableView.deleteRows(at: [indexPath], with: .automatic)
                let delayTime = DispatchTime.now() + .milliseconds(250)

                ParticleLogger.logInfo(NSStringFromClass(type(of: self)), format: "Device unclaim complete. Device count: %i, Devices: %@", withParameters: getVaList([self.devices.count, self.devices]))

