 
         @executionCallbacks[requestId] = onResults
 
-        @signedSend message, @shellSocket
+        @shellSocket.send new jmp.Message message
 
 
     inspect: (code, cursor_pos, onResults) ->

    interrupt: ->
        console.log "sending SIGINT"
        @kernelProcess.kill('SIGINT')

    # send a signed Jupyter message (adapted from github.com/n-riesco/jmp)
    signedSend: (message, socket) ->
        encodedMessage =
            idents:        message.idents or []
            signature:     ''
            header:        JSON.stringify message.header
            parent_header: JSON.stringify (message.parent_header or {})
            metadata:      JSON.stringify (message.metadata or {})
            content:       JSON.stringify (message.content or {})

        if (@config.key)
            hmac = crypto.createHmac @config.signature_scheme.slice(5),
                @config.key
            toBuffer = (str) -> new Buffer str, "utf8"
            hmac.update toBuffer encodedMessage.header
            hmac.update toBuffer encodedMessage.parent_header
            hmac.update toBuffer encodedMessage.metadata
            hmac.update toBuffer encodedMessage.content
            encodedMessage.signature = hmac.digest "hex"

        console.log "signedMessage:", encodedMessage

        socket.send encodedMessage.idents.concat [
            '<IDS|MSG>'
            encodedMessage.signature
            encodedMessage.header
            encodedMessage.parent_header
            encodedMessage.metadata
            encodedMessage.content
        ]

    # onResults is a callback that may be called multiple times
    # as results come in from the kernel

                stream: 'error'
            }

    destroy: ->
        console.log "sending shutdown"

