Completed part 1 of the homework