Finished part 3 of assignment 4