hw6 and hw5 solutions