Updated with Flowchart