Added diagram to help understand the flow