public function getRootNodes()
    {
        $roots = [];
        foreach ($this->all() as $node) {

            $isRoot = true;

            foreach ($node->getEdges() as $edge) {
                if ($edge->getTo() == $node) {
                    $isRoot = false;
                }
            }


            if ($isRoot) {
                array_push($roots, $node);
            }
        }

        return $roots;
    }