explained the flow