debug for flow control