public ArrayList<Task> getAllChildrenById(int Id) {
        for (int i = 0; i < tasks.size(); i++) {
            if (tasks.get(i).getParentID() == Id && tasks.get(i).getTaskID() != Id) {
                children.add(tasks.get(i));
                getAllChildrenById(tasks.get(i).getTaskID());
            }
        }
        return children;
    }