Reworked summary function
Updated Flowchart