Mostly working.
Added the flowchart from lab.