flow and state