Finished coding for part 2