Updated for HW3 part 2