         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()
         
 

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




# slider

slid = (id) -> new Slider

    fig1: fig1()
    fig2: fig2()

# user code


compute = ()->

    console.log "######## pre-code ########"

    # refresh sink sheets
    for sl of $blab.slider
        $blab.slider[sl].update()

    # local copy of vars 
    for sh of $blab.sheet
        $blab.sheet[sh].toLocal()

    console.log "######## user-code ########"

    fn = (A, x) ->
        A.dot x
