Part 1 of hw3.