public void markNode(Node current, boolean covered) {
        if (covered) {
            publish(new HighlightPoint(layer, current, coveredPoint));
            cover.add(current);
            reachable.remove(current); //remove if present
            unreachable.remove(current);
            for (Node to : current.expand()) {
                //highlight edge

                //both edge's nodes are covered
                if (cover.contains(to)) {
                    publish(new HighlightEdge(layer, current, to, Color.YELLOW));
                } else {
                    publish(new HighlightEdge(layer, current, to, Color.GREEN));
                    //point
                    publish(new HighlightPoint(layer, to, reachablePoint));
                    reachable.add(to);
                    unreachable.remove(to);
                }
            }
        } else {
            cover.remove(current);

            List<Node> nn = current.expand();
            boolean coveredByNeighbour = false;
            for (Node to : nn) {
                //from is not in cover
                if (cover.contains(to)) {
                    coveredByNeighbour = true;
                    publish(new HighlightEdge(layer, current, to, Color.GREEN));
                } else {
                    publish(new HighlightEdge(layer, current, to, Color.RED));

                    //check all neighours which has been possibly covered by this node
                    boolean isCovered = false;
                    for (Node nNeighbour : to.expand()) {
                        if (cover.contains(nNeighbour)) {
                            isCovered = true;
                            //publish(new HighlightEdge(layer, nNeighbour, to, Color.GREEN));
                        }
                    }

                    if (!isCovered) {
                        reachable.remove(to);
                        unreachable.add(to);
                        publish(new HighlightPoint(layer, to, notCovered));
                    }
                }
            }

            if (coveredByNeighbour) {
                publish(new HighlightPoint(layer, current, reachablePoint));
                unreachable.remove(current);
                reachable.add(current);
            } else {
                publish(new HighlightPoint(layer, current, notCovered));
                reachable.remove(current);
                unreachable.add(current);
            }
        }
        updateStats();
    }