debugged so article compiles and change the flowchart