trying to fix the flow issue