Finished Section 3.5 exercise 1&2