added functions to flowchart