         else
             cb(false, persistent_session)
 
-    salvus_exec = (input, cb) ->
-        console.log("a!")        
+    salvus_exec = (opts) ->
+        opts = defaults opts,
+            input: required
+            cb: required
+        console.log("a! - input=#{input}")
         session (error, s) ->
             if error
                 console.log("ERROR GETTING SESSION")
                 return
-            console.log("go!")
             s.execute_code
-                code        : input
-                cb          : (x) -> console.log(x)
+                code        : opts.input
+                cb          : opts.cb
                 preparse    : true
     
     

### 

$(() ->
    uuid = require('misc').uuid
    
    active_cell = undefined


            return true
        cell = active_cell
        if not cell?
            console.log("BUG -- active cell not defined")
            return
        console?.log('execute_code!', cell)
        input = cell.find(".salvus-cell-input")
        input_text = input.text()
        #input_text = input.val()
        output = cell.find(".salvus-cell-output")

        #output_text = eval(input_text)
        #worksheet.attr('contenteditable',false)

        output.text("")
        salvus_exec
            input: input_text
            cb: (mesg) ->
                console.log("CALLBACK", mesg)
                if mesg.stdout?
                    output.text(output.text() + mesg.stdout)
                if mesg.stderr?
                    output.text(output.text() + mesg.stderr)
                    
        next = cell.next()
        if next.length == 0
            next = worksheet.append_salvus_cell()
