HW3P2 - index modified