@Override
	public void handleMessages(Inbox inbox) {
		while(inbox.hasNext()) {
			Message m = inbox.next();
			if(m instanceof MarkMessage) {
				if(parent == null || !inbox.getSender().equals(parent)) {
					continue;// don't consider mark messages sent by children
				}
				this.setColor(Color.RED);
				// forward the message to all children
				for(Edge e : outgoingConnections) {
					if(!e.endNode.equals(parent)) { // don't send it to the parent
						send(m, e.endNode);
					}
				}
				// alternatively, we could broadcast the message:
				// broadcast(m);
			}
		}
	}