work for part 2 of hw3