   (let [avg-seq (repeat (count ts) (average ts))
         X    (seasonal-matrix (count ts))
         fix  (i/mmult (variance-matrix X) (i/trans X) ts)
-        adj  (i/mmult (i/sel X :except-cols 0) (i/sel fix :except-rows 0))
-        ats  (i/plus avg-seq (i/minus ts adj))]
-  ats))
+        adj  (i/mmult (i/sel X :except-cols 0) (i/sel fix :except-rows 0))]
+     (i/plus avg-seq (i/minus ts adj))))
 
-; 
-(def plot1 (c/line-chart (range (count test-ts)) (deseasonalize test-ts)))
-; (c/add-lines plot1 (range 50) (range 50))
+
+(def plot1 (c/scatter-plot (i/matrix (range (count test-ts))) (deseasonalize test-ts)))
+(add-lines plot1 (i/matrix (range (count test-ts))) test-ts)
 
 ; WHOOPBANG
-
+ 
 (defn whoop-cofactor
-  "construct a matrix of cofactors; first column is comprised 
-  of ones, second column is a range from 1 to [num-months].  The 
-  result is a [num-months]x2 incanter matrix."
+  "construct a matrix of cofactors; first column is comprised of ones,
+  second column is a range from 1 to [num-months].  The result is a
+  [num-months]x2 incanter matrix."
   [num-months]
   (i/trans (i/bind-rows (repeat num-months 1) (range 1 (inc num-months)))))
 

; (defn matrix-map
;   [m func]
;   "Apply a function to every element in a matrix"
;   (map (fn [x] (map func x)) m))
  [x]
  (i/matrix (repeat x 1)))

;De-seasonalize time-series

(defn seasonal-rows [n]
  "lazy sequence of monthly dummy vectors"
  (vec
   (take n (partition 11 1 (cycle (cons 1 (repeat 11 0)))))))

(defn seasonal-matrix
  "create a matrix of [num-months]x11 of monthly dummies, where
