    app-state))
 
 (re-frame/register-handler
+ :process-phone-detail-response
+ (fn
+   ;; store info for the specific phone-id in the db
+   [app-state [_ phone-id response]]
+   (assoc-in app-state [:phone-details (keyword phone-id)] response)))
+
+(re-frame/register-handler
+ :process-phone-detail-bad-response
+ (fn
+   [app-state [_ [phone-id response]]]
+   (println "Error getting phone detail for id: " phone-id)
+   (println response)
+   app-state))
+
+(re-frame/register-handler
+ :load-phone-detail
+ (fn
+   ;; fetch information for the phone with the given phone-id
+   [app-state [_ phone-id]]
+   (ajax/GET (str "phones/" phone-id ".json")
+             {:handler #(re-frame/dispatch [:process-phone-detail-response phone-id %1])
+              :error-handler #(re-frame/dispatch [:process-phone-detail-bad-response phone-id %1])
+              :response-format :json
+              :keywords? true})
+   app-state))
+
+(re-frame/register-handler
  :initialise-db             ;; usage: (dispatch [:initialise-db])
  (fn
    [_ _]                   ;; Ignore both params (db and v).

   [:dd @additional-features]])

(defn specs
  [phone]
  [:ul {:class "specs"}
   [availability (reaction (:availiability @phone))]

         ^{:key (:name phone)} [phone-component phone])])))

(defn search-component
  "component for the search input"
  []
  (let [search-input (re-frame/subscribe [:search-input])])
  (fn []
