Solution to hw2