move flow-state structure over to flow.rkt and add utilities for it