Update code for problem 3
Problem 6
Problem 7