Finished part 2 of assignment 4