First attempt at hw2.