   end
 
   def find(html_tree, "." <> class) do
-    find_by_selector(class, html_tree, &class_matcher/3, [])
+    {:ok, nodes } = find_by_selector(class, html_tree, &class_matcher/3, { :ok, [] })
+    nodes
       |> Enum.reverse
   end
 
   def find(html_tree, "#" <> id) do
-    find_by_selector(id, html_tree, &id_matcher/3, [])
+    { _status, nodes } = find_by_selector(id, html_tree, &id_matcher/3, { :ok, [] })
+    nodes
       |> List.first
   end
 
   def find(html_tree, tag_name) do
-    find_by_selector(tag_name, html_tree, &tag_matcher/3, [])
+    {:ok, nodes} = find_by_selector(tag_name, html_tree, &tag_matcher/3, {:ok, [] })
+    nodes
       |> Enum.reverse
   end
 


  defp tag_matcher(tag_name, node, acc) do
    { tag, _, _ } = node

    if tag == tag_name do
     acc = [node|acc]
    end

    acc


  defp class_matcher(class_name, node, acc) do
    { _, attributes, _ } = node
    { :ok, acc_nodes } = acc

    if attribute_match?(attributes, "class", class_name) do
      acc = {:ok, [node|acc_nodes] }
    end

    acc
