             hinges)))
 
 (defn calculate-gravity-forces [nodes]
-    (zipmap (keys nodes) (repeat [0 (- gravity-strength)])))
+    (zipmap (keys nodes)
+        (map (fn [{m :mass}]
+            [0 (- (* gravity-strength m))])
+            (vals nodes))))
 
 (defn calculate-ground-forces [nodes]
     (zipmap (keys nodes)
         (map (fn [{[ x y ] :pos [ xv yv ] :vel }]
             (if (< y 0)
-                (vec* [(- xv) (+ (Math/max 0 (- yv)) (- y))] ground-strength)
+                (vec+
+                    (vec* [(- xv) (Math/max 0 (- yv))] ground-grip-strength)
+                    (vec* [0 (- y)] ground-rebound-strength))
                 [0 0])) (vals nodes))))
+
+(defn calculate-drag-forces [nodes]
+    (zipmap (keys nodes)
+        (map (fn [{v :vel m :mass}] (vec* v (- (* m drag-factor))))
+            (vals nodes))))
 
 (defn calculate-all-node-forces [{:keys [nodes springs hinges]}]
     (merge-with vec+
         (calculate-spring-forces nodes springs)
         (calculate-hinge-forces nodes hinges)
         (calculate-gravity-forces nodes)
-        (calculate-ground-forces nodes)))
+        (calculate-ground-forces nodes)
+        (calculate-drag-forces nodes)))
 
 (defn update-node-velocities [nodes forces time-step]
     (merge-with (fn [n f]
         (assoc n
-            :vel (vec+ (:vel n) (vec* f time-step))))
+            :vel (vec+ (:vel n) (vec* f (/ time-step (:mass n))))))
         nodes
         forces))
 


(def initial-game-state (make-state
    {
        :head (make-node 250 150)
        :tail (make-node 50 150)
        :h-l-k (make-node 260 75)
        :h-l-f (make-node 250 0)
        :h-t-k (make-node 260 75)
        :h-t-f (make-node 250 0)
        :t-l-k (make-node 40 75)
        :t-l-f (make-node 50 0)
        :t-t-k (make-node 40 75)
        :t-t-f (make-node 50 0)
    }
    (map (partial apply make-spring) [
        [:head :tail]
        [:head :h-l-k]
        [:h-l-k :h-l-f]

            (. tick-timer (start))
            (. render-timer (start))
            (dorun (map (partial apply events/listen) [
                [document.body EventType/KEYDOWN (partial input-event input-state-ref) true]
                [document.body EventType/KEYUP (partial input-event input-state-ref) true]
                [tick-timer Timer/TICK #(tick game-state-ref (deref input-state-ref))]
                [render-timer Timer/TICK #(rerender canvas (deref game-state-ref))]]))
            (dom/appendChild document.body (dom/createDom "div" {}
                (dom/createDom "h1" {} "QWASIOKL!!")
                (dom/createDom "div" {} "Try pressing keys Q, W, A, S, I, O, K, and L.")
                (dom/createDom "div" {}
                    (dom/createTextNode "My code lives here: ")
                    (dom/createDom "a" (.strobj {"href" my-code-url}) my-code-url))
