finished hw2 pt d