now with flowchart