second attempt at hw2