added final flow chart