Add flow and states