NB – this is just the flowchart. A detailed description of the underlying method is available here.