             *out* (writer outs)]
     (try
       (let [incoming (read-line)
-            [cmd args] (clojure.string/split incoming #"\|")
+            [cmd arg-1 arg-2] (clojure.string/split incoming #"\|")
             ret (cond
                   (= "find" cmd) (find-book consumer
                                             access-token
-                                            args)
-                  (= "add" cmd) (add-book-to-shelf consumer access-token
-                                                   args "to-read")
+                                            arg-1)
+                  (= "add" cmd) (check-response
+                                 (add-book-to-shelf consumer access-token
+                                                    arg-1 "to-read"))
                   (= "rank" cmd) (rank-to-read-books consumer access-token
                                                      user-id)
                   (= "export" cmd) (export-shelf consumer
                                                  access-token
                                                  user-id
-                                                 args))]
+                                                 arg-1)
+                  (= "review" cmd) (check-response
+                                    (add-book-review-by-title
+                                     consumer
+                                     access-token
+                                     user-id
+                                     arg-1
+                                     arg-2)))]
         (println ret))
       (catch Exception ex
         (println "oh noes!" (.getMessage ex))))))

            [server.socket :as s])
  (:gen-class))

(defn add-book-review-by-title
  [consumer access-token user-id title rating & [review-text]]
  (if-let [shelved-id (:id (first (find-book-on-shelves consumer
                                                        access-token
                                                        user-id
                                                        title)))]
    (add-book-review consumer access-token shelved-id rating
                     review-text)
    "Could not find book on shelves"))

(defn rank-books-on-shelf

            [myshelf.books :refer [find-book-by-title]]
            [myshelf.friends :refer [get-user-friends]]
            [myshelf.rank :refer [rank-books]]
            [myshelf.reviews :refer [add-book-review
                                     get-book-review
                                     edit-book-review]]
            [myshelf.shelves :refer [add-book-to-shelf
                                     find-book-on-shelves
                                     get-all-books-on-shelf]]
