A few edits to make the solution to the first problem work.