Added flow chart and its explanation