Added logic for flow_steps