trying to fix the flow