private Stage connectStages(ArrayList<Stage> stages, int count) { Stage current = Stage.initial(count); for (int i = 0; i < stages.size(); i += 1) current = stages.get(i).connectFrom(current); return current; }