Figure 1: Algorithm processing flow.