function find(current) {

    // algorythm:
    // is current a promitive?
    //   // finish recursion without modifying the path
    // is current a hash?
    //   // find a key or value that position is in their range
    //     // if key is in range, terminate recursion with exisiting path
    //     // if a value is in range push the corresponding key to the path
    //     //   andcontinue recursion
    // is current an array
    //   // find the item that position is in it"s range and push the index
    //   //  of the item to the path and continue recursion with that item.

    var i = 0

    if (!current || [MAP_TAG, SEQ_TAG].indexOf(current.tag) === -1) {
      return path
    }

    if (current.tag === MAP_TAG) {
      for (i = 0; i < current.value.length; i++) {
        var pair = current.value[i]
        var key = pair[0]
        var value = pair[1]

        if (isInRange(key)) {
          return path
        } else if (isInRange(value)) {
          path.push(key.value)
          return find(value)
        }
      }
    }

    if (current.tag === SEQ_TAG) {
      for (i = 0; i < current.value.length; i++) {
        var item = current.value[i]

        if (isInRange(item)) {
          path.push(i.toString())
          return find(item)
        }
      }
    }

    return path

    /**
    * Determines if position is in node"s range
    * @param  {object}  node - AST node
    * @return {Boolean}      true if position is in node"s range
    */
    function isInRange(node) {
      /* jshint camelcase: false */

      // if node is in a single line
      if (node.start_mark.line === node.end_mark.line) {

        return (position.line === node.start_mark.line) &&
        (node.start_mark.column <= position.column) &&
        (node.end_mark.column >= position.column)
      }

      // if position is in the same line as start_mark
      if (position.line === node.start_mark.line) {
        return position.column >= node.start_mark.column
      }

      // if position is in the same line as end_mark
      if (position.line === node.end_mark.line) {
        return position.column <= node.end_mark.column
      }

      // if position is between start and end lines return true, otherwise
      // return false.
      return (node.start_mark.line < position.line) &&
      (node.end_mark.line > position.line)
    }
  }
recursive find function that finds the node matching the position
@param  {object} current - AST object to serach into