public ArrayList<Node> updateNodePositions(ArrayList<Node>n){
    	ArrayList<Node> newNodes = new ArrayList<Node>();
    	for (int i=0;i<n.size();i++){
    		Node current = n.get(i);
    		current.x = (float) this.layout.getX(current.id);
    		current.y = (float) this.layout.getY(current.id);
    		newNodes.add(current);
    	}
    	return newNodes;
    }