hw5 solutions, mark 1