public void drawChart(Graphics g, int startX, int startY) {
        // All 'next node' calculations are handled in here
        //TODO
        ArrayList<Task> children = breakdown.getChildren(); // this is what we are renderng

        if (children.isEmpty()) {
            // draw line from start to finish, nothing to see here
            g.drawLine(startX, startY, 700, startY); // if no tasks, current 700 will be endX
        } else {
            // this is where the rendering actually happens
            // get first later
            ArrayList<Task> firstLayer = new ArrayList<Task>(); // all tasks with no dependancies
            ArrayList<Task> nextLayer = new ArrayList<Task>(); // all tasks with dependancies
            for (Task child : children) {
                if (child.getDependentNodes().isEmpty()) {
                    firstLayer.add(child);
                } else {
                    nextLayer.add(child);
                }
            }

            g.drawLine(startX, startY, startX + 20, startY);

            startX += 20; // move along

            // formula for split  l = [(g + b)(n - 1)]

            int n = firstLayer.size();

            int l = (n - 1) * (30 + 40); // box height = 80, gap = 30

            g.drawLine(startX, (startY - (l / 2)), startX, (startY + (l / 2)));


            int y = startY - (l / 2);

            for (Task current : firstLayer) {
                // draw brace
                g.drawLine(startX, y, startX + 20, y);
                drawNode(g, startX + 20, y - 20, current); // render task     
                // check if no nodes that depend
                ArrayList<Task> nodesThatDepend = pert.getNodesThatDepend(current);
                if (nodesThatDepend.isEmpty() && nextLayer.isEmpty() == false){
                    // draw a line from the task to the end
                    g.drawLine(startX + 140, y, 650, y);
                    g.drawLine(650, y, 650, startY);
                    
                }
                
                
                if (n != 1) {
                    y += (l / (n - 1)); // l is distance between tasks
                } // else no need to increase
                

                
                
            }
            startX += 140; // add on len, startY is still centre
            renderLayer(g, firstLayer, nextLayer, startX, startY);

            // next, render next layer

        }
    }