Finished both exercises in question #2, and the assignment as a whole