private int updateWidth(Task node)
    {
        if (node.getSubtasks().isEmpty())
        {
            return 1;
        } 
        else
        {
            for (Task nodes : node.getSubtasks())
            {
                width = width + updateWidth(nodes);
            }
            return width;
        }
    }