Applied new Flow Chart to code