added discussion, reordered flow chapter