fix the flow, last commit has some issues