Redoing HW3 part 2