         container = $("[data-sym=#{@spec.id}][data-type='table']")[0]
 
         @defaults =
-            data: @sheet.data
+            data: @sheet.spec.data
             afterChange: (change, source) =>
-                compute() if source is "edit" and @spec.compute
-            columns: ({type: 'numeric'} for k in [1..@sheet.data[0].length])
+                compute() if source is "edit" and @sheet.spec.compute
+            columns: ({type: 'numeric'} for k in [1..@sheet.spec.data[0].length])
             rowHeaders: @sheet.rowHeaders
             colHeaders: @sheet.colHeaders
             contextMenu: false
 
-        @table = new Handsontable container, $.extend({}, @defaults, @spec.table)
-
-    update: ->
-        @table.loadData @sheet.data
+        @table = new Handsontable container, $.extend({}, @defaults, @spec)
+
+    update: ->
+        @table.loadData @sheet.spec.data
         @table.render()
         
 


# tables

tab = (id) -> new Table {id:id, compute:true, table: {rowHeaders: false}}
$blab.table =
    A: tab "A"
    x: tab "x"
    b: tab "b"
    y: tab "y"



# figures


$blab.sheet['q'].rowHeaders = ['one','two']
$blab.sheet['q'].colHeaders = ['i','ii','iii','iv','v','vi']

# slider

slid = (id) -> new Slider
