 
   return null
 
-Continuum.submodels = (ws_conn_string, topic) ->
+Continuum.submodels = (ws_conn_string, topic, apikey) ->
   # ###function : Continuum.submodels
   # creates a websocket which subscribes and listens for model changes
   # #####Parameters

        clientid = msgobj['status'][2]
        Continuum.clientid = clientid
        $.ajaxSetup({'headers' : {'Continuum-Clientid' : clientid}})
    return null
  return s


  catch error
    s = new MozWebSocket(ws_conn_string)
  s.onopen = () ->
    s.send(
      JSON.stringify(
        msgtype : 'subscribe'
        topic : topic
        auth : apikey
      )
    )
  s.onmessage = (msg) ->
    msgobj = JSON.parse(msg.data)
    if msgobj['msgtype'] == 'modelpush'
