 
   make_world: (value) ->
     return value if @is_world(value)
-    return @_from_dict(value) if isObject(value)
+    return @_from_dict(value) if _.isObject(value)
     @_from_value value
     
   _children: -> @get(CHILDREN)

AUTHORITY = "_AUTHORITY"
INDEX = "_INDEX"

isFunction = (value) ->
  typeof(value) == "function"

isObject = (value) ->
  typeof(value) == "object"

isString = (value) ->
  typeof(value) == "string"

class World
  constructor: (up, label, rx) ->
    assert up, "up always exists"
    assert isObject(up), "up is an object"
    @up = up
    cache_rx = rx or @up.get_raw(RX)
    assert cache_rx, "cache_rx"
    @doc = cache_rx.map()
    assert isString(label), "label is string"
    @doc.put(LABEL, label)
    @doc.put(CHILDREN, cache_rx.array())
    @doc.put(RX, rx) if rx?


  get: (key) ->
    value = @get_raw(key)
    return value(@,{}) if _.isFunction(value)
    value

  owner: (key) ->
