     func fetchData() {
         let location = viewModel.getSelectedLocation()
         let date = viewModel.getSelectedDate()
+        
+        self.startLoadingViewAnimation()
+        
         GSRNetworkManager.instance.getAvailability(for: location.lid, date: date) { (rooms) in
+            
             DispatchQueue.main.async {
                 if let rooms = rooms {
                     self.viewModel.updateData(with: rooms)
                     self.refreshDataUI()
                     self.rangeSlider.reload()
                     self.refreshBarButton()
+                    self.stopLoadingViewAnimation()
                 }
             }
         }

    }

    @objc fileprivate func handleBarButtonPressed(_ sender: Any) {
//        switch viewModel.state {
//        case .loggedOut:
//            if viewModel.getSelectedLocation().service == "wharton" {
//                presentWebviewLoginController()
//            } else {
//                presentLoginController()
//            }
//            break
//        case .loggedIn:
//            let message = "Are you sure you wish to log out?"
//            let alert = UIAlertController(title: "Confirm Logout",
//                                          message: message,
//                                          preferredStyle: .alert)
//            let cancelAction = UIAlertAction(title: "Cancel", style: .cancel, handler: nil)
//            alert.addAction(cancelAction)
//            alert.addAction(UIAlertAction(title: "Confirm", style: .default, handler:{ (UIAlertAction) in
//                DispatchQueue.main.async {
//                    GSRUser.clear()
//                    self.refreshBarButton()
//                }
//            }))
//            present(alert, animated: true)
//            break
//        case .readyToSubmit(let booking):
//            submitPressed(for: booking)
//            break
//        }
        if let booking = viewModel.getBooking() {
            submitPressed(for: booking)
        } else {

        prepareRangeSlider()
        prepareTableView()
        prepareEmptyView()
        prepareLoadingView()
    }

    private func preparePickerView() {
