update hw3 part 1, 2