                     self.nodeLocations.append(CLLocationCoordinate2D(latitude: CLLocationDegrees(Float(splitStringCoordinatesPairs[0])!), longitude: CLLocationDegrees(Float(splitStringCoordinatesPairs[1])!)))
                 }
                 print(self.nodeLocations)
+                self.activityIndicator.stopAnimating()
                 self.table.reloadData()
             }
             else{

    var selectedLocation = ""
    var nodeLocations = [CLLocationCoordinate2D]()
    
    @IBOutlet var table: UITableView!
    
    override func viewDidLoad() {
        super.viewDidLoad()

    }

    func scanData(){
        //setup a activity indicator and keep animating till the data is fetched
        activityIndicator.center = self.view.center
        activityIndicator.hidesWhenStopped = true
        activityIndicator.activityIndicatorViewStyle = UIActivityIndicatorViewStyle.gray
        view.addSubview(activityIndicator)
        
        activityIndicator.startAnimating()
        let dynamoDBObjectMapper = AWSDynamoDBObjectMapper.default()
        
        let scanExpression = AWSDynamoDBScanExpression()
