private void undoHelper(boolean fromNetwork) {

		//get the top of the action stack, handle it, and push it to the future actions stack for redo
		if(pastActions.empty()) {
			System.out.println("no actions to undo!");
			return;
		}
		if(!fromNetwork)
			networking.sendAction(new BoardEltExchange(null, BoardActionType.UNDO));
		BoardAction b = pastActions.pop();
		BoardElt be;
		switch(b.getType()) {
		case ELT_MOD:
			//			boardElts   
			//			System.out.println("undoing a modification on node "+b.getTarget());
			b.getTarget().undo();
			b.getTarget().repaint();
			futureActions.push(b);
			break;
		case CREATION:
			//undoing a creation means doing a deletion
			be = b.getTarget();
			if(be==null)
				return;
			boardElts.remove(be.getUID());
			if(be.getType()==BoardEltType.PATH) {
				paths.remove(be);
			} else {
				panel.remove(be);
			}
			futureActions.push(new CreationAction(be));
			break;
		case DELETION:
			//undoing a deletion means doing a creation
			be = b.getTarget();
			if(be==null)
				return;
			boardElts.put(be.getUID(), be);
			if(be.getType()==BoardEltType.PATH) {
				paths.add((boardnodes.BoardPath)be);
			} else {
				panel.add(be);
			}
			futureActions.push(new DeletionAction(be));
			break;
		}
		panel.repaint();
	}