added flowchart for problems 4-6