code for flowchart