 
     func didPan(gestureRecognizer: UIPanGestureRecognizer) {
 
-        // TODO: detect whether we are scrolling up & down, or left to right.
-        // if scrolling up and down, simply set content offset for scrollview
-        // otherwise do the below
-
         if gestureRecognizer.state == .began {
             startConstant = currentCardViewCenterXConstraint?.constant ?? 0
         }
 
         let translationX = gestureRecognizer.translation(in: self.view).x
+
+        // detect whether we are scrolling up & down, or left to right.
+        // if scrolling up and down, simply set content offset for scrollview
+        // otherwise pan and page
+        let translationInScrollView = gestureRecognizer.translation(in: self.scrollView)
+        if scrollView.contentSize.height > view.bounds.height
+            && abs(translationInScrollView.y) > abs(translationInScrollView.x) {
+            self.scrollView.contentOffset = CGPoint(x: 0, y: -translationInScrollView.y)
+            return
+        }
 
         if gestureRecognizer.state == .ended {
             // figure out where the view would stop based on the velocity with which the user is panning

                self.currentCardViewController = previousCardViewController
                self.currentCardViewController.cardView.addGestureRecognizer(self.panGestureRecognizer)
                self.previousCardViewController = newPreviousCardViewController
            }
        })
    }

                self.currentCardViewController = nextCardViewController
                self.currentCardViewController.cardView.addGestureRecognizer(self.panGestureRecognizer)
                self.nextCardViewController = newNextCardViewController
                self.placeDetailsCardView(cardView: self.currentCardViewController.cardView, heightDidChange: self.currentCardViewController.cardView.frame.height)
            }
        })
    }
