Start of solution to problem 3
Finished problem 3