finally finish part 1 of hw4