     orders ?= 'order'
     hrefExtension ?= 'html'
     demoteTopIndex ?= no
-    root ?= '/'               # XXX finish implementing this!
+    rootPath ?= '/'               # XXX finish implementing this!
     # single options don't have to come wrapped in an Array
     sources = [ sources ] unless Array.isArray sources
     targets = [ targets ] unless Array.isArray targets

    files = []

    through (file, encoding, transformCallback) ->
      # if vinyl objects have different properties, take first defined
      source = (file[source] for source in sources).reduce (x, y) -> x ?= y
      source ?= file    # just look for title and order on the vinyl obj itself
      if source?.navSkip
        @push file
        transformCallback()
        return
      title = (source[title] for title in titles).reduce (x, y) -> x ?= y
      order = (source[order] for order in orders).reduce (x, y) -> x ?= y
      # insert new nav into the tree
      nav = insertNavIntoTree file.relative, hrefExtension, title, order, root
      # set properties of vinyl object XXX does this need error handling?
      for target in targets
        obj = file


orderGen = 9999

insertNavIntoTree = (relativePath, extension, title, order, rootPath) ->
  _path = path.resolve '/', relativePath
    .replace /index\.[^/]+$/, ''              # index identified with directory
    .replace /\.[^./]+$/, '.' + extension     # e.g. '.jade' -> '.html'
