public static void extendPath(){
		i = finalPath.listIterator();
		i.next();
		while(i.hasNext()){
			PathPart pp = i.next();
			char direction = pp.direction.charAt(0);
			if(direction == ' '){
				pp = i.next();
				direction = pp.direction.charAt(0);
			}
			if(direction == 'U' || direction == 'D') extendVertical(pp);
			else extendHorizontal(pp);
		}
	}