finished hw2 (gave up on last problem)