Figure 8:
Structure of implemented recover function.