Finished part 4 of Assignment 2