Solution for problem 5
Clean up solution for problem 5
Solution for problem 6